import request from '@/utils/request'

export default {
    //获取单词分类列表
    getWordGradeList() {
        return request({
            url: `/admin/studyservice/studygrade//getWordGradeList`,
            method: 'get'
          })
    },
    // 条件查询单词分页
    pageWordCondition(current, limit, wordQuery) {
        return request({
          url: `/admin/studyservice/studyword/pageWordCondition/${current}/${limit}`,
          method: 'post',
          data : wordQuery
        })
    },

    // 根据id删除单词
    deleteWordById(id) {
      return request({
        url: `/admin/studyservice/studyword/deleteWord/${id}`,
        method: 'delete',
      })
    },

    //根据id查询单词
    getWordMsgById(id) {
      return request({
        url: `/admin/studyservice/studyword/getWordMsg/${id}`,
        method: 'get'
      })
  },

    //更新单词
    updateWordMsg(studyWord) {
      return request({
        url: `/admin/studyservice/studyword/updateWordMsg`,
        method: 'post',
        data : studyWord
      })
    },

    // 根据id删除单词类别
    deleteGradeById(id) {
      return request({
        url: `/admin/studyservice/studygrade/deleteGrade/${id}`,
        method: 'delete',
      })
    },

    //根据id获取单词类别
    getGradeMsgById(id) {
      return request({
        url: `/admin/studyservice/studygrade/getGradeMsg/${id}`,
        method: 'get'
      })
  },

    //更新单词
    updateGradeMsg(studyGrade) {
      return request({
        url: `/admin/studyservice/studygrade/updateGradeMsg`,
        method: 'post',
        data : studyGrade
      })
    },

}
